<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width= , initial-scale=1.0">
    <title>Document</title>
    <style>
        @keyframes move {
            0% {
                transform: translate(0, 0);
            }

            100% {
                transform: translate(1000px, 0);
            }
        }

        div {
            width: 100px;
            height: 100px;
            background-color: pink;
            /* 动画名称 */
            animation-name: move;
            /* 动画持续时间 */
            animation-duration: 2s;
            /* 动画运动曲线 */
            /* animation-timing-function: ease; */
            /* 何时开始 */
            /* animation-delay: 1s; */
            /* 重复次数  infinite无限的 */
            /* animation-iteration-count: infinite; */
            /* 是否反向播放 默认normal反方向alternate*/
            /* animation-direction: alternate; */
            /* 动画结束后状态 默认backwards 回到起始状态   停留结束状态forwards*/
            /* animation-fill-mode: forwards; */
            /* 前两个name 和 duration一定要写 */
            /* animation: name duration timing-function delay iteration-count direction fill-mode; */
            animation: move 2s ease 1s infinite alternate forwards;
        }

        div:hover {
            animation-play-state: paused;
        }
    </style>
</head>

<body>
    <div>

    </div>
</body>

</html>